package com.example.businessmanage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.businessmanage.domain.po.FosterAgreementPO;
import org.apache.ibatis.annotations.Param;

/**
 * 代养协议Mapper（MyBatis-Plus）
 */
public interface FosterAgreementMapper extends BaseMapper<FosterAgreementPO> {

    /**
     * 根据代养人ID和宠物ID查询协议（判断是否已签署）
     * @param fosterUserId 代养人ID
     * @param petId 宠物ID
     * @return 代养协议PO（null-未签署）
     */
    FosterAgreementPO selectByFosterAndPet(@Param("fosterUserId") Long fosterUserId, @Param("petId") Long petId);
}
